<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('sys_users', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('name')->nullable();
            $table->string('username')->nullable();
            $table->string('nickname')->nullable();
            $table->string('mobile', 32)->nullable();
            $table->boolean('gender')->nullable()->comment('性别((1-男 2-女 0-保密)');
            $table->boolean('status')->nullable();
            $table->string('email')->nullable()->unique('users_email_unique');
            $table->integer('dept_id')->nullable()->comment('部门ID');
            $table->timestamp('email_verified_at')->nullable();
            $table->string('password');
            $table->rememberToken();
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('sys_users');
    }
};
